package base;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.BaseAdapter;

import java.util.List;

/**
 * Created by cch on 2016/6/20.
 */
public abstract class HMBaseAdapter<T,Q> extends BaseAdapter {
    private List<T> list;
    private Context ct;
    private Q view;

    public HMBaseAdapter(){
        super();
    }
    public HMBaseAdapter(Context ct,List<T> list) {
        super();
        this.ct = ct;
        this.list = list;
    }

    public HMBaseAdapter(Context ct,List<T> list,Q view){
        super();
        this.ct = ct;
        this.list = list;
        this.view = view;
    }
    @Override
    public int getCount() {
        return list.size();
    }

    @Override
    public Object getItem(int position) {
        return list.get(position);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

}
